package com.victualler.core.config.menu.controller;

import com.victualler.core.base.controller.BaseRestController;
import com.victualler.core.common.dto.PageDto;
import com.victualler.core.config.menu.dto.MenuDto;
import com.victualler.core.config.menu.dto.request.MenuRequestDto;
import com.victualler.core.config.menu.dto.response.MenuResponseDto;
import com.victualler.core.config.menu.entity.MenuDao;
import com.victualler.core.config.menu.repository.MenuQueryRepository;
import com.victualler.core.config.menu.repository.MenuRepository;
import com.victualler.core.config.menu.service.MenuService;

import java.util.List;


/**
 * @author: Guoshichang
 * @discription:
 */
public interface MenuController  extends BaseRestController<MenuDao,MenuRepository,MenuQueryRepository,MenuService> {
    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param menuRequestDto
     * @Function  根据条件入参PermissionRequestDto动态分页查询权限
     */
    public PageDto<MenuResponseDto> getByRequestDto(MenuRequestDto menuRequestDto, int from , int limit);

    /**
     * @author Guoshichang
     * @since 0:45 on 2018/9/15.
     * @return  MenuDto
     * @Function
     */
    public MenuDto getAllMenuTree();

    /**
     * @author Guoshichang
     * @since 19:52 on 2018/8/28.
     * @param name 菜单名称
     * @return List
     * @Function  根据菜单名称模糊查询菜单
     */
    public List<MenuDao> getByName(String name);
}
